Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/asmjit/asmjit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkobalicek <kobalicek.petr@gmail.com>2017-03-04 22:37:42 +0300
committerkobalicek <kobalicek.petr@gmail.com>2017-03-04 22:37:42 +0300
commit35ba2ad83a4fdc1fbe6133e651b0b9c433bf46a0 (patch)
treef3ceb2a2ff7a8d5c174f82eca98387f60796ec51
parent951c62e330716d6d76577106c3c8ca5c2c6a3eb0 (diff)
Minor changes to cmake files
-rw-r--r--CMakeLists.txt7
-rw-r--r--CxxProject.cmake7
2 files changed, 8 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 421d1d1..83c80ab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,7 +42,9 @@ set(ASMJIT_BUILD_TEST ${ASMJIT_BUILD_TEST} CACHE BOOLEAN "Build 'asmjit_t
# =============================================================================
include("${ASMJIT_DIR}/CxxProject.cmake")
+
cxx_project(asmjit)
+cxx_detect_standard(ASMJIT_PRIVATE_CFLAGS)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(ASMJIT_PRIVATE_LFLAGS "/OPT:REF /OPT:ICF")
@@ -58,7 +60,6 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
endif()
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "^(GNU|Clang)$")
- cxx_detect_standard(ASMJIT_PRIVATE_CFLAGS)
cxx_detect_cflags(ASMJIT_PRIVATE_CFLAGS
"-fno-tree-vectorize"
"-fvisibility=hidden"
@@ -69,10 +70,6 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "^(GNU|Clang)$")
"-fmerge-all-constants")
endif()
-if(ASMJIT_TRACE)
- list(APPEND ASMJIT_PRIVATE_CFLAGS "${CXX_DEFINE}ASMJIT_TRACE")
-endif()
-
if(WIN32)
list(APPEND ASMJIT_PRIVATE_CFLAGS "${CXX_DEFINE}_UNICODE")
else()
diff --git a/CxxProject.cmake b/CxxProject.cmake
index b068a8a..19a7449 100644
--- a/CxxProject.cmake
+++ b/CxxProject.cmake
@@ -27,7 +27,12 @@ if (NOT __CXX_INCLUDED)
function(cxx_detect_standard out)
set(out_array)
- cxx_detect_cflags(out_array "-std=c++14" "-std=c++11" "-std=c++0x")
+
+ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+ cxx_detect_cflags(out_array "/std:c++latest" "/std:c++14")
+ else()
+ cxx_detect_cflags(out_array "-std=c++17" "-std=c++14" "-std=c++11" "-std=c++0x")
+ endif()
# Keep only the first flag detected, which keeps the highest version supported.
if(out_array)