Fix typedef visibilities
[hiphop-php.git] / hphp / compiler / CMakeLists.txt
blobf271ee3a600368517f73d5f179e86b4d812e441c
1 set(SOURCE_SUBDIRS expression statement analysis system util parser)
3 set(CXX_SOURCES)
4 auto_sources(files "*.cpp" "${SOURCE_SUBDIRS}")
5 list(APPEND CXX_SOURCES ${files})
7 set(C_SOURCES)
8 auto_sources(files "*.c" "${SOURCE_SUBDIRS}")
9 list(APPEND C_SOURCES ${files})
11 set(HEADER_SOURCES)
12 auto_sources(files "*.h" "{$SOURCE_SUBDIRS}")
13 list(APPEND HEADER_SOURCES ${files})
14 HHVM_PUBLIC_HEADERS(compiler ${files})
16 include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../")
18 set(CMAKE_CURRENT_BINARY_DIR "${CMAKE_SOURCE_DIR}/bin")
20 foreach (CXX_FILE ${CXX_SOURCES})
21   if(${CXX_FILE} MATCHES ".no.cpp$")
22     SET_SOURCE_FILES_PROPERTIES(
23       ${CXX_FILE}
24       PROPERTIES
25       COMPILE_FLAGS -O0
26     )
27   endif()
28 endforeach()
30 add_definitions(-DALWAYS_ASSERT=1)
32 add_library(hphp_analysis STATIC ${CXX_SOURCES} ${C_SOURCES} ${HEADER_SOURCES})
33 auto_source_group("hphp_analysis" "${CMAKE_CURRENT_SOURCE_DIR}"
34   ${CXX_SOURCES} ${C_SOURCES} ${HEADER_SOURCES})
35 target_link_libraries(hphp_analysis boost hphp_util hphp_system)
36 if (ENABLE_COTIRE)
37   cotire(hphp_analysis)
38 endif()