diff options
author | dan sinclair <dj2@everburning.com> | 2018-11-20 10:52:22 -0500 |
---|---|---|
committer | David Neto <dneto@google.com> | 2018-11-20 10:52:22 -0500 |
commit | 8088edb8104388e06481f29928609caee742e737 (patch) | |
tree | e5de618205f3e29da2a70925056494c9a3037ed9 /CMakeLists.txt | |
parent | e390591a28e042872376b9db4de5433b15702c02 (diff) | |
download | amber-8088edb8104388e06481f29928609caee742e737.tar.gz |
Roll DEPS; Fixup build issues. (#72)
Roll DEPS; Fixup build issues.
This CL updates the various DEPS entries for amber and fixes up the
cmake policy warning around VERSION information.
The -fvisiblity=hidden flag is set to remove warnings from shaderc and
glslang symbols.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 80 |
1 files changed, 41 insertions, 39 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 296194b..ca16372 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,7 +43,6 @@ include(src/vulkan/find_vulkan.cmake) add_definitions(-DAMBER_ENGINE_VULKAN=$<BOOL:${Vulkan_FOUND}>) add_definitions(-DAMBER_ENGINE_DAWN=$<BOOL:${Dawn_FOUND}>) - if ("${CMAKE_BUILD_TYPE}" STREQUAL "") message(STATUS "No build type selected, default to Debug") set(CMAKE_BUILD_TYPE "Debug") @@ -57,29 +56,31 @@ endif() if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") set(CUSTOM_CXX_FLAGS - ${CUSTOM_CXX_FLAGS} - -std=c++11 - -Wall - -Werror - -Weverything - -Wextra - -Wno-c++98-compat - -Wno-c++98-compat-pedantic - -Wno-padded - -Wno-switch-enum - -Wno-unknown-pragmas - -Wno-unknown-warning-option) + ${CUSTOM_CXX_FLAGS} + -std=c++11 + -fvisibility=hidden + -Wall + -Werror + -Weverything + -Wextra + -Wno-c++98-compat + -Wno-c++98-compat-pedantic + -Wno-padded + -Wno-switch-enum + -Wno-unknown-pragmas + -Wno-unknown-warning-option) elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") set(CUSTOM_CXX_FLAGS - ${CUSTOM_CXX_FLAGS} - -Wall - -std=c++11 - -Werror - -Wextra - -Wno-unknown-pragmas - -Wpedantic - -pedantic-errors) + ${CUSTOM_CXX_FLAGS} + -std=c++11 + -fvisibility=hidden + -Wall + -Werror + -Wextra + -Wno-unknown-pragmas + -Wpedantic + -pedantic-errors) elseif(MSVC) # We don't want to have to copy the C Runtime DLL everywhere the executable # goes. So compile code to assume the CRT is statically linked, i.e. use @@ -89,22 +90,23 @@ elseif(MSVC) else() set(CUSTOM_CXX_FLAGS ${CUSTOM_CXX_FLAGS} /MT) endif() + set(CUSTOM_CXX_FLAGS - ${CUSTOM_CXX_FLAGS} - /bigobj - /EHsc - /W3 - /WX - /wd4068 - /wd4514 - /wd4571 - /wd4625 - /wd4626 - /wd4710 - /wd4774 - /wd4820 - /wd5026 - /wd5027 + ${CUSTOM_CXX_FLAGS} + /bigobj + /EHsc + /W3 + /WX + /wd4068 + /wd4514 + /wd4571 + /wd4625 + /wd4626 + /wd4710 + /wd4774 + /wd4820 + /wd5026 + /wd5027 ) endif() @@ -128,9 +130,9 @@ function(amber_default_compile_options TARGET) if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") set_target_properties(${TARGET} PROPERTIES LINK_FLAGS - -static - -static-libgcc - -static-libstdc++) + -static + -static-libgcc + -static-libstdc++) endif() endif() endfunction() |