Centos下使用Clion,nginx的CMakeLists.txt,分3步配置。

2023-11-20

nginx的配置:
./configure --with-http_ssl_module --with-http_v2_module

Clion下的CMakeLists.txt

(1)将Nginx的代码全部加入CMakeLists.txt

cmake_minimum_required(VERSION 3.12)
project(nginx)

set(CMAKE_CXX_STANDARD 14)

include_directories(objs)
include_directories(src/core)
include_directories(src/event)
include_directories(src/http)
include_directories(src/http/modules)
include_directories(src/http/modules/perl)
include_directories(src/http/v2)
include_directories(src/mail)
include_directories(src/os/unix)
include_directories(src/stream)
include_directories(src/util)

#(2)加入这行
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -L /usr/lib64/ -ldl -lpthread -lcrypt -lpcre -lcrypto -lssl -lz  -Wl,-E  -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g ")

#(3)注释掉其他没有用到的模块,不相关的代码
add_executable(nginx
        objs/ngx_auto_config.h
#        objs/ngx_auto_headers.h
        objs/ngx_modules.c
        src/core/nginx.c
        src/core/nginx.h
        src/core/ngx_array.c
        src/core/ngx_array.h
        src/core/ngx_buf.c
        src/core/ngx_buf.h
        src/core/ngx_conf_file.c
        src/core/ngx_conf_file.h
        src/core/ngx_config.h
        src/core/ngx_connection.c
        src/core/ngx_connection.h
        src/core/ngx_core.h
        src/core/ngx_cpuinfo.c
        src/core/ngx_crc.h
        src/core/ngx_crc32.c
        src/core/ngx_crc32.h
        src/core/ngx_crypt.c
        src/core/ngx_crypt.h
        src/core/ngx_cycle.c
        src/core/ngx_cycle.h
        src/core/ngx_file.c
        src/core/ngx_file.h
        src/core/ngx_hash.c
        src/core/ngx_hash.h
        src/core/ngx_inet.c
        src/core/ngx_inet.h
        src/core/ngx_list.c
        src/core/ngx_list.h
        src/core/ngx_log.c
        src/core/ngx_log.h
        src/core/ngx_md5.c
        src/core/ngx_md5.h
        src/core/ngx_module.c
        src/core/ngx_module.h
        src/core/ngx_murmurhash.c
        src/core/ngx_murmurhash.h
        src/core/ngx_open_file_cache.c
        src/core/ngx_open_file_cache.h
        src/core/ngx_output_chain.c
        src/core/ngx_palloc.c
        src/core/ngx_palloc.h
        src/core/ngx_parse.c
        src/core/ngx_parse.h
        src/core/ngx_parse_time.c
        src/core/ngx_parse_time.h
        src/core/ngx_proxy_protocol.c
        src/core/ngx_proxy_protocol.h
        src/core/ngx_queue.c
        src/core/ngx_queue.h
        src/core/ngx_radix_tree.c
        src/core/ngx_radix_tree.h
        src/core/ngx_rbtree.c
        src/core/ngx_rbtree.h
        src/core/ngx_regex.c
        src/core/ngx_regex.h
        src/core/ngx_resolver.c
        src/core/ngx_resolver.h
        src/core/ngx_rwlock.c
        src/core/ngx_rwlock.h
        src/core/ngx_sha1.c
        src/core/ngx_sha1.h
        src/core/ngx_shmtx.c
        src/core/ngx_shmtx.h
        src/core/ngx_slab.c
        src/core/ngx_slab.h
        src/core/ngx_spinlock.c
        src/core/ngx_string.c
        src/core/ngx_string.h
        src/core/ngx_syslog.c
        src/core/ngx_syslog.h
#        src/core/ngx_thread_pool.c
#        src/core/ngx_thread_pool.h
        src/core/ngx_times.c
        src/core/ngx_times.h
#        src/event/modules/ngx_devpoll_module.c
        src/event/modules/ngx_epoll_module.c
#        src/event/modules/ngx_eventport_module.c
#        src/event/modules/ngx_kqueue_module.c
#        src/event/modules/ngx_poll_module.c
#        src/event/modules/ngx_select_module.c
#        src/event/modules/ngx_win32_poll_module.c
#        src/event/modules/ngx_win32_select_module.c
        src/event/ngx_event.c
        src/event/ngx_event.h
        src/event/ngx_event_accept.c
        src/event/ngx_event_connect.c
        src/event/ngx_event_connect.h
        src/event/ngx_event_openssl.c
        src/event/ngx_event_openssl.h
        src/event/ngx_event_openssl_stapling.c
        src/event/ngx_event_pipe.c
        src/event/ngx_event_pipe.h
        src/event/ngx_event_posted.c
        src/event/ngx_event_posted.h
        src/event/ngx_event_timer.c
        src/event/ngx_event_timer.h
        src/event/ngx_event_udp.c
#        src/http/modules/perl/ngx_http_perl_module.c
#        src/http/modules/perl/ngx_http_perl_module.h
        src/http/modules/ngx_http_access_module.c
#        src/http/modules/ngx_http_addition_filter_module.c
        src/http/modules/ngx_http_auth_basic_module.c
#        src/http/modules/ngx_http_auth_request_module.c
        src/http/modules/ngx_http_autoindex_module.c
        src/http/modules/ngx_http_browser_module.c
        src/http/modules/ngx_http_charset_filter_module.c
        src/http/modules/ngx_http_chunked_filter_module.c
#        src/http/modules/ngx_http_dav_module.c
#        src/http/modules/ngx_http_degradation_module.c
        src/http/modules/ngx_http_empty_gif_module.c
        src/http/modules/ngx_http_fastcgi_module.c
#        src/http/modules/ngx_http_flv_module.c
        src/http/modules/ngx_http_geo_module.c
#        src/http/modules/ngx_http_geoip_module.c
        src/http/modules/ngx_http_grpc_module.c
#        src/http/modules/ngx_http_gunzip_filter_module.c
        src/http/modules/ngx_http_gzip_filter_module.c
#        src/http/modules/ngx_http_gzip_static_module.c
        src/http/modules/ngx_http_headers_filter_module.c
#        src/http/modules/ngx_http_image_filter_module.c
        src/http/modules/ngx_http_index_module.c
        src/http/modules/ngx_http_limit_conn_module.c
        src/http/modules/ngx_http_limit_req_module.c
        src/http/modules/ngx_http_log_module.c
        src/http/modules/ngx_http_map_module.c
        src/http/modules/ngx_http_memcached_module.c
        src/http/modules/ngx_http_mirror_module.c
#        src/http/modules/ngx_http_mp4_module.c
        src/http/modules/ngx_http_not_modified_filter_module.c
        src/http/modules/ngx_http_proxy_module.c
#        src/http/modules/ngx_http_random_index_module.c
        src/http/modules/ngx_http_range_filter_module.c
#        src/http/modules/ngx_http_realip_module.c
        src/http/modules/ngx_http_referer_module.c
        src/http/modules/ngx_http_rewrite_module.c
        src/http/modules/ngx_http_scgi_module.c
#        src/http/modules/ngx_http_secure_link_module.c
#        src/http/modules/ngx_http_slice_filter_module.c
        src/http/modules/ngx_http_split_clients_module.c
        src/http/modules/ngx_http_ssi_filter_module.c
        src/http/modules/ngx_http_ssi_filter_module.h
        src/http/modules/ngx_http_ssl_module.c
#        src/http/modules/ngx_http_ssl_module.h
        src/http/modules/ngx_http_static_module.c
#        src/http/modules/ngx_http_stub_status_module.c
#        src/http/modules/ngx_http_sub_filter_module.c
        src/http/modules/ngx_http_try_files_module.c
        src/http/modules/ngx_http_upstream_hash_module.c
        src/http/modules/ngx_http_upstream_ip_hash_module.c
        src/http/modules/ngx_http_upstream_keepalive_module.c
        src/http/modules/ngx_http_upstream_least_conn_module.c
        src/http/modules/ngx_http_upstream_random_module.c
        src/http/modules/ngx_http_upstream_zone_module.c
        src/http/modules/ngx_http_userid_filter_module.c
        src/http/modules/ngx_http_uwsgi_module.c
#        src/http/modules/ngx_http_xslt_filter_module.c
        src/http/ngx_http.c
        src/http/ngx_http.h
        src/http/ngx_http_cache.h
        src/http/ngx_http_config.h
        src/http/ngx_http_copy_filter_module.c
        src/http/ngx_http_core_module.c
        src/http/ngx_http_core_module.h
        src/http/ngx_http_file_cache.c
        src/http/ngx_http_header_filter_module.c
        src/http/ngx_http_parse.c
        src/http/ngx_http_postpone_filter_module.c
        src/http/ngx_http_request.c
        src/http/ngx_http_request.h
        src/http/ngx_http_request_body.c
        src/http/ngx_http_script.c
        src/http/ngx_http_script.h
        src/http/ngx_http_special_response.c
        src/http/ngx_http_upstream.c
        src/http/ngx_http_upstream.h
        src/http/ngx_http_upstream_round_robin.c
        src/http/ngx_http_upstream_round_robin.h
        src/http/ngx_http_variables.c
        src/http/ngx_http_variables.h
        src/http/ngx_http_write_filter_module.c
        src/http/v2/ngx_http_v2.c
        src/http/v2/ngx_http_v2.h
        src/http/v2/ngx_http_v2_encode.c
        src/http/v2/ngx_http_v2_filter_module.c
        src/http/v2/ngx_http_v2_huff_decode.c
        src/http/v2/ngx_http_v2_huff_encode.c
        src/http/v2/ngx_http_v2_module.c
        src/http/v2/ngx_http_v2_module.h
        src/http/v2/ngx_http_v2_table.c
#        src/mail/ngx_mail.c
#        src/mail/ngx_mail.h
#        src/mail/ngx_mail_auth_http_module.c
#        src/mail/ngx_mail_core_module.c
#        src/mail/ngx_mail_handler.c
#        src/mail/ngx_mail_imap_handler.c
#        src/mail/ngx_mail_imap_module.c
#        src/mail/ngx_mail_imap_module.h
#        src/mail/ngx_mail_parse.c
#        src/mail/ngx_mail_pop3_handler.c
#        src/mail/ngx_mail_pop3_module.c
#        src/mail/ngx_mail_pop3_module.h
#        src/mail/ngx_mail_proxy_module.c
#        src/mail/ngx_mail_realip_module.c
#        src/mail/ngx_mail_smtp_handler.c
#        src/mail/ngx_mail_smtp_module.c
#        src/mail/ngx_mail_smtp_module.h
#        src/mail/ngx_mail_ssl_module.c
#        src/mail/ngx_mail_ssl_module.h
#        src/misc/ngx_cpp_test_module.cpp
#        src/misc/ngx_google_perftools_module.c
        src/os/unix/ngx_alloc.c
        src/os/unix/ngx_alloc.h
        src/os/unix/ngx_atomic.h
        src/os/unix/ngx_channel.c
        src/os/unix/ngx_channel.h
        src/os/unix/ngx_daemon.c
#        src/os/unix/ngx_darwin.h
#        src/os/unix/ngx_darwin_config.h
#        src/os/unix/ngx_darwin_init.c
#        src/os/unix/ngx_darwin_sendfile_chain.c
        src/os/unix/ngx_dlopen.c
        src/os/unix/ngx_dlopen.h
        src/os/unix/ngx_errno.c
        src/os/unix/ngx_errno.h
#        src/os/unix/ngx_file_aio_read.c
        src/os/unix/ngx_files.c
        src/os/unix/ngx_files.h
#        src/os/unix/ngx_freebsd.h
#        src/os/unix/ngx_freebsd_config.h
#        src/os/unix/ngx_freebsd_init.c
#        src/os/unix/ngx_freebsd_sendfile_chain.c
#        src/os/unix/ngx_gcc_atomic_amd64.h
#        src/os/unix/ngx_gcc_atomic_ppc.h
#        src/os/unix/ngx_gcc_atomic_sparc64.h
        src/os/unix/ngx_gcc_atomic_x86.h
        src/os/unix/ngx_linux.h
#        src/os/unix/ngx_linux_aio_read.c
        src/os/unix/ngx_linux_config.h
        src/os/unix/ngx_linux_init.c
        src/os/unix/ngx_linux_sendfile_chain.c
        src/os/unix/ngx_os.h
#        src/os/unix/ngx_posix_config.h
        src/os/unix/ngx_posix_init.c
        src/os/unix/ngx_process.c
        src/os/unix/ngx_process.h
        src/os/unix/ngx_process_cycle.c
        src/os/unix/ngx_process_cycle.h
        src/os/unix/ngx_readv_chain.c
        src/os/unix/ngx_recv.c
        src/os/unix/ngx_send.c
        src/os/unix/ngx_setaffinity.c
        src/os/unix/ngx_setaffinity.h
        src/os/unix/ngx_setproctitle.c
        src/os/unix/ngx_setproctitle.h
        src/os/unix/ngx_shmem.c
        src/os/unix/ngx_shmem.h
        src/os/unix/ngx_socket.c
        src/os/unix/ngx_socket.h
#        src/os/unix/ngx_solaris.h
#        src/os/unix/ngx_solaris_config.h
#        src/os/unix/ngx_solaris_init.c
#        src/os/unix/ngx_solaris_sendfilev_chain.c
#        src/os/unix/ngx_sunpro_atomic_sparc64.h
        src/os/unix/ngx_thread.h
#        src/os/unix/ngx_thread_cond.c
#        src/os/unix/ngx_thread_id.c
#        src/os/unix/ngx_thread_mutex.c
        src/os/unix/ngx_time.c
        src/os/unix/ngx_time.h
        src/os/unix/ngx_udp_recv.c
        src/os/unix/ngx_udp_send.c
        src/os/unix/ngx_udp_sendmsg_chain.c
        src/os/unix/ngx_user.c
        src/os/unix/ngx_user.h
        src/os/unix/ngx_writev_chain.c
#        src/stream/ngx_stream.c
#        src/stream/ngx_stream.h
#        src/stream/ngx_stream_access_module.c
#        src/stream/ngx_stream_core_module.c
#        src/stream/ngx_stream_geo_module.c
#        src/stream/ngx_stream_geoip_module.c
#        src/stream/ngx_stream_handler.c
#        src/stream/ngx_stream_limit_conn_module.c
#        src/stream/ngx_stream_log_module.c
#        src/stream/ngx_stream_map_module.c
#        src/stream/ngx_stream_proxy_module.c
#        src/stream/ngx_stream_realip_module.c
#        src/stream/ngx_stream_return_module.c
#        src/stream/ngx_stream_script.c
#        src/stream/ngx_stream_script.h
#        src/stream/ngx_stream_set_module.c
#        src/stream/ngx_stream_split_clients_module.c
#        src/stream/ngx_stream_ssl_module.c
#        src/stream/ngx_stream_ssl_module.h
#        src/stream/ngx_stream_ssl_preread_module.c
#        src/stream/ngx_stream_upstream.c
#        src/stream/ngx_stream_upstream.h
#        src/stream/ngx_stream_upstream_hash_module.c
#        src/stream/ngx_stream_upstream_least_conn_module.c
#        src/stream/ngx_stream_upstream_random_module.c
#        src/stream/ngx_stream_upstream_round_robin.c
#        src/stream/ngx_stream_upstream_round_robin.h
#        src/stream/ngx_stream_upstream_zone_module.c
#        src/stream/ngx_stream_variables.c
#        src/stream/ngx_stream_variables.h
#        src/stream/ngx_stream_write_filter_module.c
)


本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Centos下使用Clion,nginx的CMakeLists.txt,分3步配置。 的相关文章

随机推荐

  • cv2.minAreaRect()

    功能 求出在点集下的最小面积矩形 输入 格式 points array shape n 1 2 解释 其中points是点集 数据类型为ndarray array x1 y1 x2 y2 xn yn 输出 格式 rect tuple x y
  • Centos7 安装 postgreSQL

    谷明科技 专注于大数据和人工智能领域的创新者 PostgreSQL 介绍 PostgreSQL 是一个开源且强大的关系型数据库 且具有多平台扩展能力 不同于传统的关系型数据库 例如mysql sqlserver等 PostgreSQL使用S
  • this调用本类的其他构造器

    Student类 package Java project 1 public class Student private String name private String schoolName public Student public
  • javascript的函数中this指向判断

    前言 最近在写 React 项目 然后补习了下 es6 的 class 发现 实例方法被赋值后 this 指向 undefined 这里对 this 指向作一次总结 一 通过 函数的 调用方式 来判断 this 指向 1 函数名 通过 函数
  • Zero-ETL、大模型和数据工程的未来

    编者按 本文探讨了数据工程领域的未来趋势和挑战 以及其不断变化 甚至经常出现 重塑 的特点 在数据工程领域 大数据的性能 容量提升总是有一定的上限 每一次进步都会带来一定的技术提升 从而提高上限 但是很快我们就能到达这个上限 直到下一次技术
  • 【Bugfix】flutter GetX 使用 Obx 监听 GetxController 时,页面退出 GetxController 无法销毁

    背景 我的页面数据全来自 GetxController 每次进入时需要重置数据 但 GetX 似乎把 GetxController 保留了 下次在进入页面直接复用了之前的数据 导致数据混乱 尝试 一下调用均不能销毁 GetxControll
  • 设置windos电脑开机自动启动chrome浏览器,并且打开指定网页

    需求 web项目设置windos电脑开机自动启动chrome浏览器 打开指定网页地址 并设置为全屏显示 解决 使用windos的bat脚本 设置为开机自启动 代码如下 echo off cd d dp0 title Chrome taskl
  • Unity中UI组件

    一 Canvers 画布组件 Canvers下面是添加Button和Image组件 Rect Transform 1 Position 坐标位置 2 Width Height 高宽尺寸 3 Anchors 锚点 4 Pivot中心点 即UI
  • VRRP和DHCP配置

    1 VRRP术语 2 VRRP工作过程 3 DHCP的优势 4 DHCP的工作原理 1 VRRP术语 VRRP 也即虚拟路由器冗余协议 利用VRRP 一组路由器 同一个LAN中的接口 协同工作 但只有一个处于Master状态 处于该状态的路
  • 7-3 删除字符 (30 分)

    这位更是重量级 输入一个字符串 str 再输入要删除字符 c 大小写不区分 将字符串 str 中出现的所有字符 c 删除 提示 去掉两端的空格 输入格式 在第一行中输入一行字符 在第二行输入待删除的字符 输出格式 在一行中输出删除后的字符串
  • java中String作为参数传递终极解决

    今天我遇到一个问题就是string的传值问题 它虽然是一个引用数据类型 但是却和基本数据类型一样无法被改变 我看到网上的很多解释都很离谱 比如说很多解释说String要看成和Integer一样的包装类 看成 是char 的包装类 所以和其一
  • 快速开始一个 CakePHP project 的 基础/步骤

    请参考 CakePhP cookbook4 0 好的这就是本文和全部与核心 你可以跳出去了 好 正经一点 回来 1 下载xampp php集成环境 2 下载cakephp 框架 查看cookbook中的installation a 若用的x
  • 引进包类

    使用Support Library 支持库 Using the Support Library 负责人 River 完成时间 7月18日 原文链接 http developer android com training basics fra
  • (六)Spring Cloud Alibaba Sentinel(含案例源码、案例解析及软件)

    案例源码gitee地址 https gitee com BanSheng spring cloud alibaba examples tree master sentinel example client Spring Cloud Alib
  • 人工智能技术应用中机器学习里的6种偏差

    在人工智能的学习过程中 偏差会以多种不同的形式出现在机器学习中 Bias的定义 Bias 对某人或某一群体的倾向或偏见 尤指被认为不公平的方式 Bias被解释为偏差也可解释为偏见 其定义包括 不公平 一词 偏差几乎可以在每个阶段影响机器学习
  • msm8953-配置I2C 速率

    前言 本文记录调试高通平台某I2C 器件通讯出现异常 尝试修改I2C 时钟速率时所做的记录 平台 MSM8953 系统 Android 9 0 分类 I2C CLK 结论 先说结论 经过分析以及验证 平台支持的I2C特性如下 默认速度 10
  • eclipse json转为java类

    1 安装GsonFormat插件 插件地址 https github com wenxunyu GsonFormat 安装步骤在上面的地址中有 2 注意 直接放在dropins根目录下 不要放在子文件夹下 否则报错 不能正常使用插件
  • Java知识大全 - 五、Java高级编程

    1 异常和错误处理 在 Java 中 异常用于处理程序执行期间可能发生的错误和其他异常情况 异常允许开发人员以结构化和一致的方式处理错误 从而使代码更加健壮和可靠 发生错误时 Java 会创建一个异常对象 其中包含有关错误的信息 例如错误的
  • linux入门系列19--数据库管理系统(DBMS)之MariaDB

    前面讲完Linux下一系列服务的配置和使用之后 本文简单介绍一款数据库管理系统 MySQL的兄弟 MariaDB 如果你有MySQL或其他数据的使用经验 MariaDB使用起来将非常轻松 本文讲解Centos7默认的数据MariaDB 由于
  • Centos下使用Clion,nginx的CMakeLists.txt,分3步配置。

    nginx的配置 configure with http ssl module with http v2 module Clion下的CMakeLists txt 1 将Nginx的代码全部加入CMakeLists txt cmake mi