Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ project(GA VERSION 2.0.0)

configure_file("include/ga/version.hpp.in" "include/ga/version.hpp")

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

add_library(ga INTERFACE)

target_compile_features(ga INTERFACE cxx_std_11)
Expand All @@ -14,7 +17,7 @@ target_include_directories(ga INTERFACE
target_include_directories(ga SYSTEM INTERFACE
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>)

option(GA_BUILD_TEST "whether or not to build the test" OFF)
option(GA_BUILD_TEST "whether or not to build the test" ON)
if(GA_BUILD_TEST)
enable_testing()
add_subdirectory(test)
Expand Down
293 changes: 278 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,284 @@
HEADERS := $(shell find include -name \*.[ch]pp -not -name undef\*)
SRC := $(shell find test -name \*.[ch]pp) $(HEADERS)
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.29

all:
@echo Please, use CMake instead.
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target

format:
@echo Formatting source...
@clang-format -i -style=file $(SRC)
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:

tidy:
@echo Tidying source...
@clang-tidy $(HEADERS) -fix -fix-errors -- -std=c++11 -Iinclude
#=============================================================================
# Special targets provided by cmake.

# Disable implicit rules so canonical targets will work.
.SUFFIXES:

# Disable VCS-based implicit rules.
% : %,v

# Disable VCS-based implicit rules.
% : RCS/%

# Disable VCS-based implicit rules.
% : RCS/%,v

# Disable VCS-based implicit rules.
% : SCCS/s.%

# Disable VCS-based implicit rules.
% : s.%

.SUFFIXES: .hpux_make_needs_suffix_list

# Command-line flag to silence nested $(MAKE).
$(VERBOSE)MAKESILENT = -s

#Suppress display of executed commands.
$(VERBOSE).SILENT:

# A target that is always out of date.
cmake_force:
.PHONY : cmake_force

#=============================================================================
# Set environment variables for the build.

# The shell in which to execute make rules.
SHELL = /bin/sh

# The CMake executable.
CMAKE_COMMAND = /usr/local/Cellar/cmake/3.29.2/bin/cmake

# The command to remove a file.
RM = /usr/local/Cellar/cmake/3.29.2/bin/cmake -E rm -f

# Escaping for special characters.
EQUALS = =

# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /Users/mannamalai/devel/ga

# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /Users/mannamalai/devel/ga

#=============================================================================
# Targets provided globally by CMake.

# Special rule for the target test
test:
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running tests..."
/usr/local/Cellar/cmake/3.29.2/bin/ctest --force-new-ctest-process $(ARGS)
.PHONY : test

# Special rule for the target test
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/local/Cellar/cmake/3.29.2/bin/ccmake -S$(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 rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..."
/usr/local/Cellar/cmake/3.29.2/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache

# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/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 install
install: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..."
/usr/local/Cellar/cmake/3.29.2/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/local/Cellar/cmake/3.29.2/bin/cmake -P cmake_install.cmake
.PHONY : install/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/local/Cellar/cmake/3.29.2/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
.PHONY : install/local

# Special rule for the target install/local
install/local/fast: preinstall/fast
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..."
/usr/local/Cellar/cmake/3.29.2/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
.PHONY : install/local/fast

# Special rule for the target install/strip
install/strip: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..."
/usr/local/Cellar/cmake/3.29.2/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
.PHONY : install/strip

# Special rule for the target install/strip
install/strip/fast: preinstall/fast
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..."
/usr/local/Cellar/cmake/3.29.2/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
.PHONY : install/strip/fast

# The main all target
all: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start /Users/mannamalai/devel/ga/CMakeFiles /Users/mannamalai/devel/ga//CMakeFiles/progress.marks
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all
$(CMAKE_COMMAND) -E cmake_progress_start /Users/mannamalai/devel/ga/CMakeFiles 0
.PHONY : all

# The main clean target
clean:
@echo Cleaning gcov files...
@find . -name '*.gcno' -exec rm {} \;
@find . -name '*.gcda' -exec rm {} \;
@find . -name '*.gcov' -exec rm {} \;
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 clean
.PHONY : clean

# The main clean target
clean/fast: clean
.PHONY : clean/fast

# Prepare targets for installation.
preinstall: all
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall

# Prepare targets for installation.
preinstall/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall/fast

# clear depends
depend:
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend

#=============================================================================
# Target rules for targets named ga_simplest

# Build rule for target.
ga_simplest: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ga_simplest
.PHONY : ga_simplest

# fast build rule for target.
ga_simplest/fast:
$(MAKE) $(MAKESILENT) -f test/CMakeFiles/ga_simplest.dir/build.make test/CMakeFiles/ga_simplest.dir/build
.PHONY : ga_simplest/fast

#=============================================================================
# Target rules for targets named ga_simple

# Build rule for target.
ga_simple: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ga_simple
.PHONY : ga_simple

# fast build rule for target.
ga_simple/fast:
$(MAKE) $(MAKESILENT) -f test/CMakeFiles/ga_simple.dir/build.make test/CMakeFiles/ga_simple.dir/build
.PHONY : ga_simple/fast

#=============================================================================
# Target rules for targets named ga_knapsack

# Build rule for target.
ga_knapsack: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ga_knapsack
.PHONY : ga_knapsack

# fast build rule for target.
ga_knapsack/fast:
$(MAKE) $(MAKESILENT) -f test/CMakeFiles/ga_knapsack.dir/build.make test/CMakeFiles/ga_knapsack.dir/build
.PHONY : ga_knapsack/fast

#=============================================================================
# Target rules for targets named ga_multi

# Build rule for target.
ga_multi: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ga_multi
.PHONY : ga_multi

# fast build rule for target.
ga_multi/fast:
$(MAKE) $(MAKESILENT) -f test/CMakeFiles/ga_multi.dir/build.make test/CMakeFiles/ga_multi.dir/build
.PHONY : ga_multi/fast

#=============================================================================
# Target rules for targets named ga_rastrigin

# Build rule for target.
ga_rastrigin: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ga_rastrigin
.PHONY : ga_rastrigin

# fast build rule for target.
ga_rastrigin/fast:
$(MAKE) $(MAKESILENT) -f test/CMakeFiles/ga_rastrigin.dir/build.make test/CMakeFiles/ga_rastrigin.dir/build
.PHONY : ga_rastrigin/fast

#=============================================================================
# Target rules for targets named ga_version

# Build rule for target.
ga_version: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ga_version
.PHONY : ga_version

# fast build rule for target.
ga_version/fast:
$(MAKE) $(MAKESILENT) -f test/CMakeFiles/ga_version.dir/build.make test/CMakeFiles/ga_version.dir/build
.PHONY : ga_version/fast

# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... edit_cache"
@echo "... install"
@echo "... install/local"
@echo "... install/strip"
@echo "... list_install_components"
@echo "... rebuild_cache"
@echo "... test"
@echo "... ga_knapsack"
@echo "... ga_multi"
@echo "... ga_rastrigin"
@echo "... ga_simple"
@echo "... ga_simplest"
@echo "... ga_version"
.PHONY : help



#=============================================================================
# Special targets to cleanup operation of make.

# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system

.PHONY: format clean tidy
Loading