diff options
| author | Benjamin Segovia <segovia.benjamin@gmail.com> | 2012-03-21 16:58:59 +0000 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2012-08-10 16:15:47 -0700 |
| commit | c821779fda8ffa5a567250892465ad47355fda62 (patch) | |
| tree | bd0157d3c5829fd6d3656136f915ffd6d8f91a42 /backend/CMakeLists.txt | |
| parent | f35181d840683e0f3e683a296b3c287cd5e3ba5c (diff) | |
Started to implement external C interface for the compiler Output a first dummy program
Diffstat (limited to 'backend/CMakeLists.txt')
| -rw-r--r-- | backend/CMakeLists.txt | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/backend/CMakeLists.txt b/backend/CMakeLists.txt index 75d6c5f8..57e6e18c 100644 --- a/backend/CMakeLists.txt +++ b/backend/CMakeLists.txt @@ -50,14 +50,17 @@ endif (GBE_COMPILE_UTESTS) ## Linux compilation if (CMAKE_SYSTEM_NAME STREQUAL "Linux") # Hide all symbols and allows the symbols declared as visible to be exported - # set (VISIBILITY_FLAG "-fvisibility=hidden") + if (NOT GBE_COMPILE_UTESTS) + set (CMAKE_C_CXX_FLAGS "-fvisibility=hidden") + endif (NOT GBE_COMPILE_UTESTS) if (COMPILER STREQUAL "GCC") - set (CMAKE_C_CXX_FLAGS "-Wstrict-aliasing=2 -fstrict-aliasing -msse2 -ffast-math -fPIC -Wall") + set (CMAKE_C_CXX_FLAGS "${CMAKE_C_CXX_FLAGS} -Wstrict-aliasing=2 -fstrict-aliasing -msse2 -ffast-math -fPIC -Wall") set (CMAKE_CXX_FLAGS "${CMAKE_C_CXX_FLAGS} -Wno-invalid-offsetof -fno-rtti -std=c++0x") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GBE_DEBUG_MEMORY_FLAG}") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GBE_COMPILE_UTESTS_FLAG}") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${VISIBILITY_FLAG} -Wl,-E") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-E") + set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined") if (NOT GBE_COMPILE_UTESTS) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions") endif (NOT GBE_COMPILE_UTESTS) @@ -68,7 +71,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux") set (CMAKE_C_FLAGS "${CMAKE_C_CXX_FLAGS}") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GBE_DEBUG_MEMORY_FLAG}") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GBE_COMPILE_UTESTS_FLAG}") - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VISIBILITY_FLAG} -Wl,-E") + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,-E") set (CMAKE_C_FLAGS_DEBUG "-g -DGBE_DEBUG=1") set (CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -DGBE_DEBUG=1") set (CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG -DGBE_DEBUG=0") |
