cmake and begin test

This commit is contained in:
Aurélien Gauthier 2022-06-17 17:42:09 +02:00
parent 7af7366247
commit 2d58ef1ec3
7 changed files with 958 additions and 5 deletions

80
.gitignore vendored
View file

@ -2,3 +2,83 @@
*.png *.png
*.exe *.exe
*.csv *.csv
Code-C/main
Code-C/exec
Makefile
# Created by https://www.toptal.com/developers/gitignore/api/cmake,c
# Edit at https://www.toptal.com/developers/gitignore?templates=cmake,c
### C ###
# Prerequisites
*.d
# Object files
*.o
*.ko
*.obj
*.elf
# Linker output
*.ilk
*.map
*.exp
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
*.su
*.idb
*.pdb
# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
### CMake ###
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
### CMake Patch ###
# External projects
*-prefix/
# End of https://www.toptal.com/developers/gitignore/api/cmake,c

10
Code-C/CMakeLists.txt Normal file
View file

@ -0,0 +1,10 @@
cmake_minimum_required(VERSION 2.6)
project(Traitement-signal-plantes C)
include(CTest)
enable_testing()
set(CMAKE_C_FLAGS "-std=c99 -g -Wall")
add_executable(exect fileGestion.c getArray.c average.c growthRate.c power.c queue.c simulateFlux.c main.c)
#add_executable(exect main.c simulateFlux.c queue.c power.c growthRate.c average.c getArray.c fileGestion.c)

View file

@ -1,5 +1,811 @@
CC = gcc # CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.18
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:
#=============================================================================
# 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/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E rm -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/auel/Documents/Code/Traitement-signal-plantes/Code-C
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/auel/Documents/Code/Traitement-signal-plantes/Code-C
#=============================================================================
# Targets provided globally by CMake.
# 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/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 test
test:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..."
/usr/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 "No interactive CMake dialog available..."
/usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
.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
$(CMAKE_COMMAND) -E cmake_progress_start /home/auel/Documents/Code/Traitement-signal-plantes/Code-C/CMakeFiles /home/auel/Documents/Code/Traitement-signal-plantes/Code-C//CMakeFiles/progress.marks
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all
$(CMAKE_COMMAND) -E cmake_progress_start /home/auel/Documents/Code/Traitement-signal-plantes/Code-C/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
$(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 NightlyMemCheck
# Build rule for target.
NightlyMemCheck: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 NightlyMemCheck
.PHONY : NightlyMemCheck
# fast build rule for target.
NightlyMemCheck/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/NightlyMemCheck.dir/build.make CMakeFiles/NightlyMemCheck.dir/build
.PHONY : NightlyMemCheck/fast
#=============================================================================
# Target rules for targets named NightlyTest
# Build rule for target.
NightlyTest: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 NightlyTest
.PHONY : NightlyTest
# fast build rule for target.
NightlyTest/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/NightlyTest.dir/build.make CMakeFiles/NightlyTest.dir/build
.PHONY : NightlyTest/fast
#=============================================================================
# Target rules for targets named ContinuousConfigure
# Build rule for target.
ContinuousConfigure: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ContinuousConfigure
.PHONY : ContinuousConfigure
# fast build rule for target.
ContinuousConfigure/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/ContinuousConfigure.dir/build.make CMakeFiles/ContinuousConfigure.dir/build
.PHONY : ContinuousConfigure/fast
#=============================================================================
# Target rules for targets named ContinuousBuild
# Build rule for target.
ContinuousBuild: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ContinuousBuild
.PHONY : ContinuousBuild
# fast build rule for target.
ContinuousBuild/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/ContinuousBuild.dir/build.make CMakeFiles/ContinuousBuild.dir/build
.PHONY : ContinuousBuild/fast
#=============================================================================
# Target rules for targets named NightlyConfigure
# Build rule for target.
NightlyConfigure: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 NightlyConfigure
.PHONY : NightlyConfigure
# fast build rule for target.
NightlyConfigure/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/NightlyConfigure.dir/build.make CMakeFiles/NightlyConfigure.dir/build
.PHONY : NightlyConfigure/fast
#=============================================================================
# Target rules for targets named NightlyMemoryCheck
# Build rule for target.
NightlyMemoryCheck: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 NightlyMemoryCheck
.PHONY : NightlyMemoryCheck
# fast build rule for target.
NightlyMemoryCheck/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/NightlyMemoryCheck.dir/build.make CMakeFiles/NightlyMemoryCheck.dir/build
.PHONY : NightlyMemoryCheck/fast
#=============================================================================
# Target rules for targets named ExperimentalTest
# Build rule for target.
ExperimentalTest: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ExperimentalTest
.PHONY : ExperimentalTest
# fast build rule for target.
ExperimentalTest/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/ExperimentalTest.dir/build.make CMakeFiles/ExperimentalTest.dir/build
.PHONY : ExperimentalTest/fast
#=============================================================================
# Target rules for targets named ContinuousUpdate
# Build rule for target.
ContinuousUpdate: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ContinuousUpdate
.PHONY : ContinuousUpdate
# fast build rule for target.
ContinuousUpdate/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/ContinuousUpdate.dir/build.make CMakeFiles/ContinuousUpdate.dir/build
.PHONY : ContinuousUpdate/fast
#=============================================================================
# Target rules for targets named NightlyUpdate
# Build rule for target.
NightlyUpdate: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 NightlyUpdate
.PHONY : NightlyUpdate
# fast build rule for target.
NightlyUpdate/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/NightlyUpdate.dir/build.make CMakeFiles/NightlyUpdate.dir/build
.PHONY : NightlyUpdate/fast
#=============================================================================
# Target rules for targets named ExperimentalMemCheck
# Build rule for target.
ExperimentalMemCheck: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ExperimentalMemCheck
.PHONY : ExperimentalMemCheck
# fast build rule for target.
ExperimentalMemCheck/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/ExperimentalMemCheck.dir/build.make CMakeFiles/ExperimentalMemCheck.dir/build
.PHONY : ExperimentalMemCheck/fast
#=============================================================================
# Target rules for targets named ExperimentalSubmit
# Build rule for target.
ExperimentalSubmit: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ExperimentalSubmit
.PHONY : ExperimentalSubmit
# fast build rule for target.
ExperimentalSubmit/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/ExperimentalSubmit.dir/build.make CMakeFiles/ExperimentalSubmit.dir/build
.PHONY : ExperimentalSubmit/fast
#=============================================================================
# Target rules for targets named Experimental
# Build rule for target.
Experimental: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Experimental
.PHONY : Experimental
# fast build rule for target.
Experimental/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/Experimental.dir/build.make CMakeFiles/Experimental.dir/build
.PHONY : Experimental/fast
#=============================================================================
# Target rules for targets named ContinuousCoverage
# Build rule for target.
ContinuousCoverage: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ContinuousCoverage
.PHONY : ContinuousCoverage
# fast build rule for target.
ContinuousCoverage/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/ContinuousCoverage.dir/build.make CMakeFiles/ContinuousCoverage.dir/build
.PHONY : ContinuousCoverage/fast
#=============================================================================
# Target rules for targets named ExperimentalConfigure
# Build rule for target.
ExperimentalConfigure: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ExperimentalConfigure
.PHONY : ExperimentalConfigure
# fast build rule for target.
ExperimentalConfigure/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/ExperimentalConfigure.dir/build.make CMakeFiles/ExperimentalConfigure.dir/build
.PHONY : ExperimentalConfigure/fast
#=============================================================================
# Target rules for targets named Continuous
# Build rule for target.
Continuous: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Continuous
.PHONY : Continuous
# fast build rule for target.
Continuous/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/Continuous.dir/build.make CMakeFiles/Continuous.dir/build
.PHONY : Continuous/fast
#=============================================================================
# Target rules for targets named Nightly
# Build rule for target.
Nightly: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Nightly
.PHONY : Nightly
# fast build rule for target.
Nightly/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/Nightly.dir/build.make CMakeFiles/Nightly.dir/build
.PHONY : Nightly/fast
#=============================================================================
# Target rules for targets named NightlySubmit
# Build rule for target.
NightlySubmit: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 NightlySubmit
.PHONY : NightlySubmit
# fast build rule for target.
NightlySubmit/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/NightlySubmit.dir/build.make CMakeFiles/NightlySubmit.dir/build
.PHONY : NightlySubmit/fast
#=============================================================================
# Target rules for targets named NightlyStart
# Build rule for target.
NightlyStart: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 NightlyStart
.PHONY : NightlyStart
# fast build rule for target.
NightlyStart/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/NightlyStart.dir/build.make CMakeFiles/NightlyStart.dir/build
.PHONY : NightlyStart/fast
#=============================================================================
# Target rules for targets named ExperimentalCoverage
# Build rule for target.
ExperimentalCoverage: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ExperimentalCoverage
.PHONY : ExperimentalCoverage
# fast build rule for target.
ExperimentalCoverage/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/ExperimentalCoverage.dir/build.make CMakeFiles/ExperimentalCoverage.dir/build
.PHONY : ExperimentalCoverage/fast
#=============================================================================
# Target rules for targets named exect
# Build rule for target.
exect: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 exect
.PHONY : exect
# fast build rule for target.
exect/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/build
.PHONY : exect/fast
#=============================================================================
# Target rules for targets named NightlyCoverage
# Build rule for target.
NightlyCoverage: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 NightlyCoverage
.PHONY : NightlyCoverage
# fast build rule for target.
NightlyCoverage/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/NightlyCoverage.dir/build.make CMakeFiles/NightlyCoverage.dir/build
.PHONY : NightlyCoverage/fast
#=============================================================================
# Target rules for targets named ExperimentalStart
# Build rule for target.
ExperimentalStart: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ExperimentalStart
.PHONY : ExperimentalStart
# fast build rule for target.
ExperimentalStart/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/ExperimentalStart.dir/build.make CMakeFiles/ExperimentalStart.dir/build
.PHONY : ExperimentalStart/fast
#=============================================================================
# Target rules for targets named NightlyBuild
# Build rule for target.
NightlyBuild: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 NightlyBuild
.PHONY : NightlyBuild
# fast build rule for target.
NightlyBuild/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/NightlyBuild.dir/build.make CMakeFiles/NightlyBuild.dir/build
.PHONY : NightlyBuild/fast
#=============================================================================
# Target rules for targets named ExperimentalBuild
# Build rule for target.
ExperimentalBuild: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ExperimentalBuild
.PHONY : ExperimentalBuild
# fast build rule for target.
ExperimentalBuild/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/ExperimentalBuild.dir/build.make CMakeFiles/ExperimentalBuild.dir/build
.PHONY : ExperimentalBuild/fast
#=============================================================================
# Target rules for targets named ExperimentalUpdate
# Build rule for target.
ExperimentalUpdate: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ExperimentalUpdate
.PHONY : ExperimentalUpdate
# fast build rule for target.
ExperimentalUpdate/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/ExperimentalUpdate.dir/build.make CMakeFiles/ExperimentalUpdate.dir/build
.PHONY : ExperimentalUpdate/fast
#=============================================================================
# Target rules for targets named ContinuousStart
# Build rule for target.
ContinuousStart: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ContinuousStart
.PHONY : ContinuousStart
# fast build rule for target.
ContinuousStart/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/ContinuousStart.dir/build.make CMakeFiles/ContinuousStart.dir/build
.PHONY : ContinuousStart/fast
#=============================================================================
# Target rules for targets named ContinuousMemCheck
# Build rule for target.
ContinuousMemCheck: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ContinuousMemCheck
.PHONY : ContinuousMemCheck
# fast build rule for target.
ContinuousMemCheck/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/ContinuousMemCheck.dir/build.make CMakeFiles/ContinuousMemCheck.dir/build
.PHONY : ContinuousMemCheck/fast
#=============================================================================
# Target rules for targets named ContinuousTest
# Build rule for target.
ContinuousTest: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ContinuousTest
.PHONY : ContinuousTest
# fast build rule for target.
ContinuousTest/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/ContinuousTest.dir/build.make CMakeFiles/ContinuousTest.dir/build
.PHONY : ContinuousTest/fast
#=============================================================================
# Target rules for targets named ContinuousSubmit
# Build rule for target.
ContinuousSubmit: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ContinuousSubmit
.PHONY : ContinuousSubmit
# fast build rule for target.
ContinuousSubmit/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles/ContinuousSubmit.dir/build.make CMakeFiles/ContinuousSubmit.dir/build
.PHONY : ContinuousSubmit/fast
average.o: average.c.o
.PHONY : average.o
# target to build an object file
average.c.o:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/average.c.o
.PHONY : average.c.o
average.i: average.c.i
.PHONY : average.i
# target to preprocess a source file
average.c.i:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/average.c.i
.PHONY : average.c.i
average.s: average.c.s
.PHONY : average.s
# target to generate assembly for a file
average.c.s:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/average.c.s
.PHONY : average.c.s
fileGestion.o: fileGestion.c.o
.PHONY : fileGestion.o
# target to build an object file
fileGestion.c.o:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/fileGestion.c.o
.PHONY : fileGestion.c.o
fileGestion.i: fileGestion.c.i
.PHONY : fileGestion.i
# target to preprocess a source file
fileGestion.c.i:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/fileGestion.c.i
.PHONY : fileGestion.c.i
fileGestion.s: fileGestion.c.s
.PHONY : fileGestion.s
# target to generate assembly for a file
fileGestion.c.s:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/fileGestion.c.s
.PHONY : fileGestion.c.s
getArray.o: getArray.c.o
.PHONY : getArray.o
# target to build an object file
getArray.c.o:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/getArray.c.o
.PHONY : getArray.c.o
getArray.i: getArray.c.i
.PHONY : getArray.i
# target to preprocess a source file
getArray.c.i:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/getArray.c.i
.PHONY : getArray.c.i
getArray.s: getArray.c.s
.PHONY : getArray.s
# target to generate assembly for a file
getArray.c.s:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/getArray.c.s
.PHONY : getArray.c.s
growthRate.o: growthRate.c.o
.PHONY : growthRate.o
# target to build an object file
growthRate.c.o:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/growthRate.c.o
.PHONY : growthRate.c.o
growthRate.i: growthRate.c.i
.PHONY : growthRate.i
# target to preprocess a source file
growthRate.c.i:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/growthRate.c.i
.PHONY : growthRate.c.i
growthRate.s: growthRate.c.s
.PHONY : growthRate.s
# target to generate assembly for a file
growthRate.c.s:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/growthRate.c.s
.PHONY : growthRate.c.s
main.o: main.c.o
.PHONY : main.o
# target to build an object file
main.c.o:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/main.c.o
.PHONY : main.c.o
main.i: main.c.i
.PHONY : main.i
# target to preprocess a source file
main.c.i:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/main.c.i
.PHONY : main.c.i
main.s: main.c.s
.PHONY : main.s
# target to generate assembly for a file
main.c.s:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/main.c.s
.PHONY : main.c.s
power.o: power.c.o
.PHONY : power.o
# target to build an object file
power.c.o:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/power.c.o
.PHONY : power.c.o
power.i: power.c.i
.PHONY : power.i
# target to preprocess a source file
power.c.i:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/power.c.i
.PHONY : power.c.i
power.s: power.c.s
.PHONY : power.s
# target to generate assembly for a file
power.c.s:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/power.c.s
.PHONY : power.c.s
queue.o: queue.c.o
.PHONY : queue.o
# target to build an object file
queue.c.o:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/queue.c.o
.PHONY : queue.c.o
queue.i: queue.c.i
.PHONY : queue.i
# target to preprocess a source file
queue.c.i:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/queue.c.i
.PHONY : queue.c.i
queue.s: queue.c.s
.PHONY : queue.s
# target to generate assembly for a file
queue.c.s:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/queue.c.s
.PHONY : queue.c.s
simulateFlux.o: simulateFlux.c.o
.PHONY : simulateFlux.o
# target to build an object file
simulateFlux.c.o:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/simulateFlux.c.o
.PHONY : simulateFlux.c.o
simulateFlux.i: simulateFlux.c.i
.PHONY : simulateFlux.i
# target to preprocess a source file
simulateFlux.c.i:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/simulateFlux.c.i
.PHONY : simulateFlux.c.i
simulateFlux.s: simulateFlux.c.s
.PHONY : simulateFlux.s
# target to generate assembly for a file
simulateFlux.c.s:
$(MAKE) $(MAKESILENT) -f CMakeFiles/exect.dir/build.make CMakeFiles/exect.dir/simulateFlux.c.s
.PHONY : simulateFlux.c.s
# 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 "... rebuild_cache"
@echo "... test"
@echo "... Continuous"
@echo "... ContinuousBuild"
@echo "... ContinuousConfigure"
@echo "... ContinuousCoverage"
@echo "... ContinuousMemCheck"
@echo "... ContinuousStart"
@echo "... ContinuousSubmit"
@echo "... ContinuousTest"
@echo "... ContinuousUpdate"
@echo "... Experimental"
@echo "... ExperimentalBuild"
@echo "... ExperimentalConfigure"
@echo "... ExperimentalCoverage"
@echo "... ExperimentalMemCheck"
@echo "... ExperimentalStart"
@echo "... ExperimentalSubmit"
@echo "... ExperimentalTest"
@echo "... ExperimentalUpdate"
@echo "... Nightly"
@echo "... NightlyBuild"
@echo "... NightlyConfigure"
@echo "... NightlyCoverage"
@echo "... NightlyMemCheck"
@echo "... NightlyMemoryCheck"
@echo "... NightlyStart"
@echo "... NightlySubmit"
@echo "... NightlyTest"
@echo "... NightlyUpdate"
@echo "... exect"
@echo "... average.o"
@echo "... average.i"
@echo "... average.s"
@echo "... fileGestion.o"
@echo "... fileGestion.i"
@echo "... fileGestion.s"
@echo "... getArray.o"
@echo "... getArray.i"
@echo "... getArray.s"
@echo "... growthRate.o"
@echo "... growthRate.i"
@echo "... growthRate.s"
@echo "... main.o"
@echo "... main.i"
@echo "... main.s"
@echo "... power.o"
@echo "... power.i"
@echo "... power.s"
@echo "... queue.o"
@echo "... queue.i"
@echo "... queue.s"
@echo "... simulateFlux.o"
@echo "... simulateFlux.i"
@echo "... simulateFlux.s"
.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
all:
$(CC) -g fileGestion.c getArray.c average.c growthRate.c power.c queue.c simulateFlux.c main.c -lm -lpthread -o main
./main < ../02400031.TXT

5
Code-C/Makefileold Normal file
View file

@ -0,0 +1,5 @@
CC = gcc
all:
$(CC) -g fileGestion.c getArray.c average.c growthRate.c power.c queue.c simulateFlux.c main.c -lm -lpthread -o main
./main < ../02400031.TXT

View file

@ -77,9 +77,12 @@ void *threadCalculGrowthRate(void * vargp){
fileName = queueGetTabChar(rawDataQueue); fileName = queueGetTabChar(rawDataQueue);
if(i < 2){ if(i < 2){
if(i == 1){ if(i == 1){
printf("zedfghjio\n");
powerFunction(fileName, dataLign[1]); powerFunction(fileName, dataLign[1]);
growthRateFunction(**dataLign); growthRateFunction(**dataLign);
}else{ }else{
printf("zedfghjio\n");
powerFunction(fileName, dataLign[0]); powerFunction(fileName, dataLign[0]);
} }
i++; i++;
@ -87,6 +90,8 @@ void *threadCalculGrowthRate(void * vargp){
for(int y = 0; y < (nCol-1); y++){ for(int y = 0; y < (nCol-1); y++){
dataLign[0][y] = dataLign[1][y]; dataLign[0][y] = dataLign[1][y];
} }
printf("zedfghjio\n");
powerFunction(fileName, dataLign[1]); powerFunction(fileName, dataLign[1]);
growthRateFunction(**dataLign); growthRateFunction(**dataLign);
} }

View file

@ -32,6 +32,7 @@ void powerCalculation(long **p, double powerArray[]){
*/ */
void powerFunction(char* rawDataFileName, double **pw){ void powerFunction(char* rawDataFileName, double **pw){
long **p = getRawDataArray(rawDataFileName); long **p = getRawDataArray(rawDataFileName);
printArrayData(p,nRow,nCol);
double pww[nCol-1]; double pww[nCol-1];
if(p !=NULL){ if(p !=NULL){
if(pw == NULL){ if(pw == NULL){

46
Code-C/test.c Normal file
View file

@ -0,0 +1,46 @@
int main(int argc, char *argv[]){
if (argc == 1)
usage(argc, argv);
// start test
fprintf(stderr, "=> Start test \"%s\"\n", argv[1]);
int ok = 1;
if (strcmp("dummy", argv[1]) == 0)
ok = test_dummy();
else if (strcmp("is_lighted",argv[1]) == 0){
ok = test_game_is_lighted();
}else if(strcmp("has_error",argv[1]) == 0){
ok = test_game_has_error();
}else if(strcmp("check_move",argv[1]) == 0){
ok = test_game_check_move();
}else if(strcmp("game_is_over",argv[1]) == 0){
ok = test_game_is_over();
}else if(strcmp("play_move",argv[1]) == 0){
ok = test_game_play_move();
}else if(strcmp("game_restart",argv[1]) == 0){
ok = test_game_restart();
}else if(strcmp("update_flags",argv[1]) == 0){
ok = test_game_update_flags();
}else if(strcmp("default_solution",argv[1]) == 0){
ok = test_game_default_solution();
}else{
fprintf(stderr, "Error: test \"%s\" not found!\n", argv[1]);
exit(EXIT_FAILURE);
}
// print test result
if (ok == 0)
{
fprintf(stderr, "Test \"%s\" finished: SUCCESS\n", argv[1]);
return EXIT_SUCCESS;
}
else
{
fprintf(stderr, "Test \"%s\" finished: FAILURE\n", argv[1]);
return EXIT_FAILURE;
}
}