From f04b0b1058ffd5da0b6d9a18c00132e26f7b2bfe Mon Sep 17 00:00:00 2001 From: Olivier Parcollet Date: Sat, 31 Aug 2013 23:51:06 +0200 Subject: [PATCH] cmake : fix a detail in __init__ generation should use .python/__init_... to create the file. not python, otherwise when compiling application *in source* (like brew does) this is a mess... --- cmake/FindCompilerCheck.cmake | 1 + cmake/TRIQSConfig.cmake.in | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cmake/FindCompilerCheck.cmake b/cmake/FindCompilerCheck.cmake index 709cbf4b..22f9d71f 100644 --- a/cmake/FindCompilerCheck.cmake +++ b/cmake/FindCompilerCheck.cmake @@ -80,6 +80,7 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if (CMAKE_COMPILER_IS_CLANG) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ ") MESSAGE(STATUS "Adding compilation flags -stdlib=libc++ ") + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-writable-strings ") else (CMAKE_COMPILER_IS_CLANG) MESSAGE( WARNING "${line_of_star}You are on Os X but your are not using clang. This is NOT recommended...${line_of_star}") endif (CMAKE_COMPILER_IS_CLANG) diff --git a/cmake/TRIQSConfig.cmake.in b/cmake/TRIQSConfig.cmake.in index fd81a851..c6298407 100644 --- a/cmake/TRIQSConfig.cmake.in +++ b/cmake/TRIQSConfig.cmake.in @@ -136,13 +136,13 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E chdir ${TRIQS_PATH}/${TRIQS_PYTHON_L execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/pytriqs/${python_destination}) # Copy and install __init__.py files -file(WRITE ${CMAKE_BINARY_DIR}/python/__init__.py "__all__=[]") +file(WRITE ${CMAKE_BINARY_DIR}/.python/__init__.py "__all__=[]") set(partial_dir ${python_destination}) while(partial_dir MATCHES "/") string(REGEX REPLACE "/[^/]*$" "" partial_dir ${partial_dir}) if(NOT EXISTS ${CMAKE_BINARY_DIR}/pytriqs/${partial_dir}/__init__.py) - execute_process(COMMAND cp ${CMAKE_BINARY_DIR}/python/__init__.py ${CMAKE_BINARY_DIR}/pytriqs/${partial_dir}) - install(FILES ${CMAKE_BINARY_DIR}/python/__init__.py DESTINATION ${TRIQS_PYTHON_LIB_DEST}/${partial_dir}) + execute_process(COMMAND cp ${CMAKE_BINARY_DIR}/.python/__init__.py ${CMAKE_BINARY_DIR}/pytriqs/${partial_dir}) + install(FILES ${CMAKE_BINARY_DIR}/.python/__init__.py DESTINATION ${TRIQS_PYTHON_LIB_DEST}/${partial_dir}) endif(NOT EXISTS ${CMAKE_BINARY_DIR}/pytriqs/${partial_dir}/__init__.py) endwhile(partial_dir MATCHES "/")