Skip to content

Commit c307403

Browse files
committed
Merge remote-tracking branch 'origin/pr/2657' into mbedtls-2.16
* origin/pr/2657: Create link to include/mbedtls only when testing is enabled
2 parents 08f363b + ac859f3 commit c307403

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

CMakeLists.txt

+8-8
Original file line numberDiff line numberDiff line change
@@ -228,13 +228,13 @@ if(ENABLE_TESTING)
228228
COMMAND mv DartConfiguration.tcl.bak DartConfiguration.tcl
229229
)
230230
endif(UNIX)
231-
endif()
232231

233-
# Make scripts needed for testing available in an out-of-source build.
234-
if (NOT ${CMAKE_CURRENT_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
235-
link_to_source(scripts)
236-
# Copy (don't link) DartConfiguration.tcl, needed for memcheck, to
237-
# keep things simple with the sed commands in the memcheck target.
238-
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/DartConfiguration.tcl
239-
${CMAKE_CURRENT_BINARY_DIR}/DartConfiguration.tcl COPYONLY)
232+
# Make scripts needed for testing available in an out-of-source build.
233+
if (NOT ${CMAKE_CURRENT_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
234+
link_to_source(scripts)
235+
# Copy (don't link) DartConfiguration.tcl, needed for memcheck, to
236+
# keep things simple with the sed commands in the memcheck target.
237+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/DartConfiguration.tcl
238+
${CMAKE_CURRENT_BINARY_DIR}/DartConfiguration.tcl COPYONLY)
239+
endif()
240240
endif()

include/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ if(INSTALL_MBEDTLS_HEADERS)
1111
endif(INSTALL_MBEDTLS_HEADERS)
1212

1313
# Make config.h available in an out-of-source build. ssl-opt.sh requires it.
14-
if (NOT ${CMAKE_CURRENT_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
14+
if (ENABLE_TESTING AND NOT ${CMAKE_CURRENT_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
1515
link_to_source(mbedtls)
1616
endif()

0 commit comments

Comments
 (0)