Skip to content

Commit

Permalink
Merge pull request #10 from GermanAizek/master
Browse files Browse the repository at this point in the history
Added support building on MSVC toolkit ClangCL
  • Loading branch information
gaspardpetit authored Jun 11, 2022
2 parents ca2783c + 2f0ba17 commit 2194391
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,17 @@ PROJECT(${NAME})
ENABLE_TESTING()

# Update if necessary
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
IF("${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /O2")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /O2")
else()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
endif()
endif()

# BUILD AND INCLUDE GOOGLETEST
ADD_SUBDIRECTORY(libs/googletest/)
Expand Down

0 comments on commit 2194391

Please sign in to comment.