Change USE_WASM_COMPATIBLE_SOURCE =OFF by default on native, force on for WASM (#138)

* Change WASM_COMPATIBLE_SOURCE=OFF by default

The default was WASN_COMPATIBLE_SOURCE=ON COMPILE_WASM=OFF which is a
testing configuration, not a sensible default for native or wasm.

* Always USE_WASM_COMPATIBLE_SOURCE with COMPILE_WASM

* Set CMP0077 to fix variable handling
This commit is contained in:
Kenneth Heafield 2021-05-10 11:28:37 +01:00 committed by GitHub
parent 354e7ac6be
commit ce01de939d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

@ -1 +1 @@
Subproject commit ca15d61c87ef2f8f2c290b75a5da6236eb9833d2
Subproject commit 03db505fda750fdecf8000d7ef7dd78dae65861c

View File

@ -4,6 +4,10 @@ if (POLICY CMP0074)
cmake_policy(SET CMP0074 NEW) # CMake 3.12
endif ()
if (POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
endif()
project(bergamot_translator CXX C)
set(CMAKE_CXX_STANDARD 17)
@ -35,7 +39,7 @@ include(CMakeDependentOption)
# Project specific cmake options
option(COMPILE_WASM "Compile for WASM" OFF)
option(USE_WASM_COMPATIBLE_SOURCE "Use wasm compatible sources" ON)
cmake_dependent_option(USE_WASM_COMPATIBLE_SOURCE "Use wasm compatible sources" OFF "NOT COMPILE_WASM" ON)
option(COMPILE_TESTS "Compile bergamot-tests" OFF)
SET(PACKAGE_DIR "" CACHE STRING "Directory including all the files to be packaged (pre-loaded) in wasm builds")