mirror of
https://github.com/vgough/encfs.git
synced 2024-11-22 07:53:31 +01:00
Better construct Cmake lists of parameters
This commit is contained in:
parent
89cb000aba
commit
5ee4c14f1b
@ -37,17 +37,17 @@ if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 3.0)
|
|||||||
else ()
|
else ()
|
||||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||||
message ("** Assuming that GNU CXX uses -std=c++11 flag for C++11 compatibility.")
|
message ("** Assuming that GNU CXX uses -std=c++11 flag for C++11 compatibility.")
|
||||||
list(APPEND CMAKE_CXX_FLAGS "-std=c++11")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
message ("** Assuming that Clang uses -std=c++11 flag for C++11 compatibility.")
|
message ("** Assuming that Clang uses -std=c++11 flag for C++11 compatibility.")
|
||||||
list(APPEND CMAKE_CXX_FLAGS "-std=c++11")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
else()
|
else()
|
||||||
message ("** No CMAKE C++11 check. If the build breaks, you're on your own.")
|
message ("** No CMAKE C++11 check. If the build breaks, you're on your own.")
|
||||||
endif()
|
endif()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# Let's enable some compilation warnings
|
# Let's enable some compilation warnings
|
||||||
list(APPEND CMAKE_CXX_FLAGS "-Wall -Wextra")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
|
||||||
|
|
||||||
add_definitions( -DPACKAGE="encfs" )
|
add_definitions( -DPACKAGE="encfs" )
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ endif()
|
|||||||
set(CMAKE_REQUIRED_FLAGS "-Wl,--as-needed")
|
set(CMAKE_REQUIRED_FLAGS "-Wl,--as-needed")
|
||||||
CHECK_CXX_SOURCE_COMPILES("int main() {return 0;}" LINKER_SUPPORTS_WLASNEEDED)
|
CHECK_CXX_SOURCE_COMPILES("int main() {return 0;}" LINKER_SUPPORTS_WLASNEEDED)
|
||||||
if(LINKER_SUPPORTS_WLASNEEDED)
|
if(LINKER_SUPPORTS_WLASNEEDED)
|
||||||
list(APPEND EXTRA_LINKER_FLAGS "-Wl,--as-needed")
|
SET(EXTRA_LINKER_FLAGS "-Wl,--as-needed")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_REQUIRED_FLAGS)
|
set(CMAKE_REQUIRED_FLAGS)
|
||||||
|
Loading…
Reference in New Issue
Block a user