summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-04-26 19:40:04 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2017-04-26 19:40:04 +0200
commitdc1fb59fd30e76571c9151900a84ac3c814ee167 (patch)
treed806b8e696359b256b8391210bd1f45c41ac7ac4
parent4567c2c739a38094301c03ee688f16291d85f11e (diff)
downloadcssh-dc1fb59fd30e76571c9151900a84ac3c814ee167.tar.gz
cssh-dc1fb59fd30e76571c9151900a84ac3c814ee167.tar.bz2
simplified C flags
-rw-r--r--3rdParty/linenoise/Makefile104
-rw-r--r--CMakeLists.txt5
2 files changed, 76 insertions, 33 deletions
diff --git a/3rdParty/linenoise/Makefile b/3rdParty/linenoise/Makefile
index ee079f1..b558571 100644
--- a/3rdParty/linenoise/Makefile
+++ b/3rdParty/linenoise/Makefile
@@ -48,14 +48,58 @@ RM = /usr/bin/cmake -E remove -f
EQUALS = =
# The top-level source directory on which CMake was run.
-CMAKE_SOURCE_DIR = /home/abaumann/projects/cssh
+CMAKE_SOURCE_DIR = /home/abaumann/cssh
# The top-level build directory on which CMake was run.
-CMAKE_BINARY_DIR = /home/abaumann/projects/cssh
+CMAKE_BINARY_DIR = /home/abaumann/cssh
#=============================================================================
# Targets provided globally by CMake.
+# Special rule for the target install/strip
+install/strip: preinstall
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
+ /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
+.PHONY : install/strip
+
+# Special rule for the target install/strip
+install/strip/fast: install/strip
+
+.PHONY : install/strip/fast
+
+# Special rule for the target install/local
+install/local: preinstall
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
+ /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
+.PHONY : install/local
+
+# Special rule for the target install/local
+install/local/fast: install/local
+
+.PHONY : install/local/fast
+
+# Special rule for the target install
+install: preinstall
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
+ /usr/bin/cmake -P cmake_install.cmake
+.PHONY : install
+
+# Special rule for the target install
+install/fast: preinstall/fast
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
+ /usr/bin/cmake -P cmake_install.cmake
+.PHONY : install/fast
+
+# Special rule for the target list_install_components
+list_install_components:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
+.PHONY : list_install_components
+
+# Special rule for the target list_install_components
+list_install_components/fast: list_install_components
+
+.PHONY : list_install_components/fast
+
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
@@ -67,17 +111,6 @@ rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
-# Special rule for the target edit_cache
-edit_cache:
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
- /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-.PHONY : edit_cache
-
-# Special rule for the target edit_cache
-edit_cache/fast: edit_cache
-
-.PHONY : edit_cache/fast
-
# Special rule for the target test
test:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..."
@@ -89,16 +122,27 @@ test/fast: test
.PHONY : test/fast
+# Special rule for the target edit_cache
+edit_cache:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
+ /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
+.PHONY : edit_cache
+
+# Special rule for the target edit_cache
+edit_cache/fast: edit_cache
+
+.PHONY : edit_cache/fast
+
# The main all target
all: cmake_check_build_system
- cd /home/abaumann/projects/cssh && $(CMAKE_COMMAND) -E cmake_progress_start /home/abaumann/projects/cssh/CMakeFiles /home/abaumann/projects/cssh/3rdParty/linenoise/CMakeFiles/progress.marks
- cd /home/abaumann/projects/cssh && $(MAKE) -f CMakeFiles/Makefile2 3rdParty/linenoise/all
- $(CMAKE_COMMAND) -E cmake_progress_start /home/abaumann/projects/cssh/CMakeFiles 0
+ cd /home/abaumann/cssh && $(CMAKE_COMMAND) -E cmake_progress_start /home/abaumann/cssh/CMakeFiles /home/abaumann/cssh/3rdParty/linenoise/CMakeFiles/progress.marks
+ cd /home/abaumann/cssh && $(MAKE) -f CMakeFiles/Makefile2 3rdParty/linenoise/all
+ $(CMAKE_COMMAND) -E cmake_progress_start /home/abaumann/cssh/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
- cd /home/abaumann/projects/cssh && $(MAKE) -f CMakeFiles/Makefile2 3rdParty/linenoise/clean
+ cd /home/abaumann/cssh && $(MAKE) -f CMakeFiles/Makefile2 3rdParty/linenoise/clean
.PHONY : clean
# The main clean target
@@ -108,22 +152,22 @@ clean/fast: clean
# Prepare targets for installation.
preinstall: all
- cd /home/abaumann/projects/cssh && $(MAKE) -f CMakeFiles/Makefile2 3rdParty/linenoise/preinstall
+ cd /home/abaumann/cssh && $(MAKE) -f CMakeFiles/Makefile2 3rdParty/linenoise/preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
- cd /home/abaumann/projects/cssh && $(MAKE) -f CMakeFiles/Makefile2 3rdParty/linenoise/preinstall
+ cd /home/abaumann/cssh && $(MAKE) -f CMakeFiles/Makefile2 3rdParty/linenoise/preinstall
.PHONY : preinstall/fast
# clear depends
depend:
- cd /home/abaumann/projects/cssh && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
+ cd /home/abaumann/cssh && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend
# Convenience name for target.
3rdParty/linenoise/CMakeFiles/linenoise.dir/rule:
- cd /home/abaumann/projects/cssh && $(MAKE) -f CMakeFiles/Makefile2 3rdParty/linenoise/CMakeFiles/linenoise.dir/rule
+ cd /home/abaumann/cssh && $(MAKE) -f CMakeFiles/Makefile2 3rdParty/linenoise/CMakeFiles/linenoise.dir/rule
.PHONY : 3rdParty/linenoise/CMakeFiles/linenoise.dir/rule
# Convenience name for target.
@@ -133,7 +177,7 @@ linenoise: 3rdParty/linenoise/CMakeFiles/linenoise.dir/rule
# fast build rule for target.
linenoise/fast:
- cd /home/abaumann/projects/cssh && $(MAKE) -f 3rdParty/linenoise/CMakeFiles/linenoise.dir/build.make 3rdParty/linenoise/CMakeFiles/linenoise.dir/build
+ cd /home/abaumann/cssh && $(MAKE) -f 3rdParty/linenoise/CMakeFiles/linenoise.dir/build.make 3rdParty/linenoise/CMakeFiles/linenoise.dir/build
.PHONY : linenoise/fast
linenoise.o: linenoise.c.o
@@ -142,7 +186,7 @@ linenoise.o: linenoise.c.o
# target to build an object file
linenoise.c.o:
- cd /home/abaumann/projects/cssh && $(MAKE) -f 3rdParty/linenoise/CMakeFiles/linenoise.dir/build.make 3rdParty/linenoise/CMakeFiles/linenoise.dir/linenoise.c.o
+ cd /home/abaumann/cssh && $(MAKE) -f 3rdParty/linenoise/CMakeFiles/linenoise.dir/build.make 3rdParty/linenoise/CMakeFiles/linenoise.dir/linenoise.c.o
.PHONY : linenoise.c.o
linenoise.i: linenoise.c.i
@@ -151,7 +195,7 @@ linenoise.i: linenoise.c.i
# target to preprocess a source file
linenoise.c.i:
- cd /home/abaumann/projects/cssh && $(MAKE) -f 3rdParty/linenoise/CMakeFiles/linenoise.dir/build.make 3rdParty/linenoise/CMakeFiles/linenoise.dir/linenoise.c.i
+ cd /home/abaumann/cssh && $(MAKE) -f 3rdParty/linenoise/CMakeFiles/linenoise.dir/build.make 3rdParty/linenoise/CMakeFiles/linenoise.dir/linenoise.c.i
.PHONY : linenoise.c.i
linenoise.s: linenoise.c.s
@@ -160,7 +204,7 @@ linenoise.s: linenoise.c.s
# target to generate assembly for a file
linenoise.c.s:
- cd /home/abaumann/projects/cssh && $(MAKE) -f 3rdParty/linenoise/CMakeFiles/linenoise.dir/build.make 3rdParty/linenoise/CMakeFiles/linenoise.dir/linenoise.c.s
+ cd /home/abaumann/cssh && $(MAKE) -f 3rdParty/linenoise/CMakeFiles/linenoise.dir/build.make 3rdParty/linenoise/CMakeFiles/linenoise.dir/linenoise.c.s
.PHONY : linenoise.c.s
# Help Target
@@ -169,10 +213,14 @@ help:
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
+ @echo "... install/strip"
+ @echo "... install/local"
+ @echo "... install"
+ @echo "... list_install_components"
+ @echo "... linenoise"
@echo "... rebuild_cache"
- @echo "... edit_cache"
@echo "... test"
- @echo "... linenoise"
+ @echo "... edit_cache"
@echo "... linenoise.o"
@echo "... linenoise.i"
@echo "... linenoise.s"
@@ -187,6 +235,6 @@ help:
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
- cd /home/abaumann/projects/cssh && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
+ cd /home/abaumann/cssh && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a4038d9..a134b6a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,12 +8,7 @@ project(cssh C)
set( CSSH_VERSION 0.0.1 )
-if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -Wno-unused-but-set-variable -D_XOPEN_SOURCE=700")
-endif()
-if("${CMAKE_CXX_COMPILER_ID}" MATCHES "[cC]lang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -D_XOPEN_SOURCE=700")
-endif()
enable_testing( )