From 421325f7403fdd4800d19327133d6e4e12fa480d Mon Sep 17 00:00:00 2001 From: Johannes Theiner Date: Thu, 23 Aug 2018 21:10:08 +0200 Subject: [PATCH 1/3] =?UTF-8?q?Cmake=20Binary=20Output=20ge=C3=A4ndert=20a?= =?UTF-8?q?uf=20bin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 6 +++++- cmake_install.cmake | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 cmake_install.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index d7ab7cb..08239cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,10 @@ project(C/C++) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") +# These are the corresponding output paths +set (EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin) +set (LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH}) + add_executable(01_ENV_MP 01_ENV/MP/main.c 01_ENV/MP/func1.c) target_link_libraries(01_ENV_MP m) add_executable(01_ENV_Testat 01_ENV/Testat/main.c 01_ENV/Testat/func1.c) @@ -34,4 +38,4 @@ add_executable(07_STD_Testat 07_STD/Testat/grundgeruest.cpp) #add_executable(Banking 10_PITF/MP/banking_base_rawptr.cpp) -add_executable(Test 11_PUTT/Test.cpp) \ No newline at end of file +add_executable(Test 11_PUTT/Test.cpp) diff --git a/cmake_install.cmake b/cmake_install.cmake new file mode 100644 index 0000000..7e4e57c --- /dev/null +++ b/cmake_install.cmake @@ -0,0 +1,44 @@ +# Install script for directory: /home/joethei/workspaces/C_CPP + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + +if(CMAKE_INSTALL_COMPONENT) + set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") +else() + set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") +endif() + +string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT + "${CMAKE_INSTALL_MANIFEST_FILES}") +file(WRITE "/home/joethei/workspaces/C_CPP/${CMAKE_INSTALL_MANIFEST}" + "${CMAKE_INSTALL_MANIFEST_CONTENT}") From c4df6182a85468d53651c18e03a28ad433576f61 Mon Sep 17 00:00:00 2001 From: Johannes Theiner Date: Thu, 23 Aug 2018 21:12:04 +0200 Subject: [PATCH 2/3] =?UTF-8?q?'cmake=5Finstall.cmake'=20l=C3=B6schen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmake_install.cmake | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 cmake_install.cmake diff --git a/cmake_install.cmake b/cmake_install.cmake deleted file mode 100644 index 7e4e57c..0000000 --- a/cmake_install.cmake +++ /dev/null @@ -1,44 +0,0 @@ -# Install script for directory: /home/joethei/workspaces/C_CPP - -# Set the install prefix -if(NOT DEFINED CMAKE_INSTALL_PREFIX) - set(CMAKE_INSTALL_PREFIX "/usr/local") -endif() -string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") - -# Set the install configuration name. -if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) - if(BUILD_TYPE) - string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" - CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") - else() - set(CMAKE_INSTALL_CONFIG_NAME "") - endif() - message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") -endif() - -# Set the component getting installed. -if(NOT CMAKE_INSTALL_COMPONENT) - if(COMPONENT) - message(STATUS "Install component: \"${COMPONENT}\"") - set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") - else() - set(CMAKE_INSTALL_COMPONENT) - endif() -endif() - -# Install shared libraries without execute permission? -if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) - set(CMAKE_INSTALL_SO_NO_EXE "1") -endif() - -if(CMAKE_INSTALL_COMPONENT) - set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") -else() - set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") -endif() - -string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT - "${CMAKE_INSTALL_MANIFEST_FILES}") -file(WRITE "/home/joethei/workspaces/C_CPP/${CMAKE_INSTALL_MANIFEST}" - "${CMAKE_INSTALL_MANIFEST_CONTENT}") From e5d4360ce4f2450e051c5b01bc81c6c8f72ba17f Mon Sep 17 00:00:00 2001 From: Johannes Theiner Date: Thu, 23 Aug 2018 21:23:11 +0200 Subject: [PATCH 3/3] =?UTF-8?q?gitignore=20ge=C3=A4ndert=20um=20Build=20Fi?= =?UTF-8?q?les=20zu=20ignorieren?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 3ca783d..14d94a4 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,8 @@ cmake-build-debug *~ *.out *.save +/bin +/CMakeFiles +CMakeCache.txt +cmake_install.cmake +Makefile