diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b0f5f76..b243e8d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,13 +10,16 @@ project(DECAF VERSION 1.0 LANGUAGES C CXX) set(DECAF_SO_VERSION "0") -find_package( PythonInterp 2.7 REQUIRED ) +find_package(PythonInterp 3 REQUIRED) option(ENABLE_SHARED "Build shared library." ON) option(ENABLE_STATIC "Build static library." ON) option(ENABLE_STRICT "Build with strict compile options." YES) option(ENABLE_TESTS "Enable compilation of tests." OFF) option(GENERATED_SOURCE_PATH "Where the generated source code is stored, default in the building tree" OFF) +if (CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -nostdlib") +endif() if (GENERATED_SOURCE_PATH) set(GSOURCE_PATH ${GENERATED_SOURCE_PATH}) @@ -46,12 +49,12 @@ set(STRICT_OPTIONS_C ) set(STRICT_OPTIONS_CXX ) if(MSVC) if(ENABLE_STRICT) - set(STRICT_OPTIONS_CPP "${STRICT_OPTIONS_CPP} /WX") + set(STRICT_OPTIONS_CPP "${STRICT_OPTIONS_CPP} /WX /Zc:__cplusplus") endif() else() - set(STRICT_OPTIONS_CXX "${STRICT_OPTIONS_CXX} -std=c++11 -O2") + set(STRICT_OPTIONS_CXX "${STRICT_OPTIONS_CXX} -std=c++14 -O2") set(STRICT_OPTIONS_CPP "${STRICT_OPTIONS_CPP} -Wall -Wuninitialized -Wno-deprecated-declarations -Wno-missing-field-initializers") - set(STRICT_OPTIONS_C "${STRICT_OPTIONS_C} -std=c99 -O2 -Wstrict-prototypes -Wno-error=strict-prototypes -fvisibility=hidden") + set(STRICT_OPTIONS_C "${STRICT_OPTIONS_C} -std=c99 -O2 -Wstrict-prototypes -Wno-error=strict-prototypes -fvisibility=hidden -Wno-error=implicit-function-declaration -Wno-error=attributes") if(CMAKE_C_COMPILER_ID MATCHES "Clang") set(STRICT_OPTIONS_CPP "${STRICT_OPTIONS_CPP} -Wno-error=unknown-warning-option -Qunused-arguments -Wno-tautological-compare") set(STRICT_OPTIONS_CPP "${STRICT_OPTIONS_CPP} -Wno-unused-function -Wno-pass-failed") |