Skip to content

Commit 88108b2

Browse files
committed
Stop generating ompd.h, only build libompd if active in cmake
1 parent 918c989 commit 88108b2

File tree

5 files changed

+4
-1180
lines changed

5 files changed

+4
-1180
lines changed

libompd/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
2-
3-
add_subdirectory(src)
1+
if(LIBOMP_OMPD_SUPPORT)
2+
add_subdirectory(src)
3+
endif()

libompd/src/CMakeLists.txt

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,16 @@ project (libompd)
22

33
add_library (ompd SHARED TargetValue.cpp omp-debug.cpp)
44

5-
add_dependencies(ompd ompd-header)
6-
75
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
86

97
include_directories (
10-
${CMAKE_CURRENT_BINARY_DIR}/include
118
${CMAKE_CURRENT_SOURCE_DIR}
129
)
1310

14-
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include)
15-
16-
ADD_CUSTOM_TARGET (
17-
ompd-header ALL
18-
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/include/ompd.h ${CMAKE_CURRENT_BINARY_DIR}/include/ompd_typedefs.h
19-
)
20-
21-
add_custom_command (
22-
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/include/ompd.h ${CMAKE_CURRENT_BINARY_DIR}/include/ompd_typedefs.h
23-
COMMAND ${BASH}
24-
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/split_def_typedef.sh
25-
${CMAKE_CURRENT_SOURCE_DIR}/ompd-template.h
26-
${CMAKE_CURRENT_BINARY_DIR}/include/ompd_typedefs.h
27-
${CMAKE_CURRENT_BINARY_DIR}/include/ompd.h
28-
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ompd-template.h
29-
)
30-
3111
INSTALL( TARGETS ompd
3212
LIBRARY DESTINATION lib
3313
ARCHIVE DESTINATION lib/static
3414
RUNTIME DESTINATION bin )
3515

36-
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/include/ompd.h DESTINATION include)
16+
INSTALL(FILES ompd.h DESTINATION include)
3717

libompd/src/omp-debug.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ extern "C" {
3333
#define STR(x) STR_HELPER(x)
3434

3535
#include "ompd.h"
36-
#include "ompd_typedefs.h"
3736

3837
/******************************************************************************
3938
* General helper functions

0 commit comments

Comments
 (0)