cmake修改不合理的地方

This commit is contained in:
jf_HS 2023-12-21 18:53:59 +08:00
parent a7281947d3
commit 8ece984a1f
6 changed files with 12 additions and 46 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.vscode/
build/

28
.vscode/tasks.json vendored
View File

@ -1,28 +0,0 @@
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: gcc.exe 生成活动文件",
"command": "D:\\Program Files (x86)\\TDM-GCC-64\\bin\\gcc.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "调试器生成的任务。"
}
],
"version": "2.0.0"
}

View File

@ -1,10 +1,7 @@
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.8)
set(CMAKE_C_COMPILER "D:\\Program Files (x86)\\TDM-GCC-64\\bin\\gcc.exe")
project(demo) project(demo)
aux_source_directory(. DIR_SRC)
add_executable(demo main.c) add_executable(demo ${DIR_SRC})

8
src/test.c Normal file
View File

@ -0,0 +1,8 @@
#include "test.h"
#include <stdio.h>
void test()
{
printf("test\n");
}

12
test.c
View File

@ -1,12 +0,0 @@
#include <openssl/aes.h>
bool aes_encrypt(const char *key, const char *iv, const char *input, size_t input_len, char **output)
{
return true;
}
bool aes_decrypt(const char *key, const char *iv, const char *input, size_t input_len, char **output)
{
return false;
}

View File

@ -1 +0,0 @@