Skip to content

Commit

Permalink
cmake fixes for unix
Browse files Browse the repository at this point in the history
  • Loading branch information
geneotech committed Oct 25, 2017
1 parent bf964e2 commit 2f3a9c2
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
project(Introspector-generator)
cmake_minimum_required(VERSION 3.8)

set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} /Ob2 /GL /Oi /O2 /permissive-"
)
project(Introspector-generator)

set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} /LTCG"
)
if(MSVC)
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} /Ob2 /GL /Oi /O2 /permissive- /std:c++latest"
)

set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} /LTCG"
)
elseif(UNIX)
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -std=gnu++1z -lstdc++fs -fpermissive"
)
endif()

add_executable(Introspector-generator "src/main.cpp")

Expand Down

0 comments on commit 2f3a9c2

Please sign in to comment.